package com.ruoyi.wx.service;

import com.wechat.pay.java.service.partnerpayments.jsapi.model.PrepayWithRequestPaymentResponse;
import org.springframework.http.ResponseEntity;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.math.BigDecimal;

/**
 * @Description: TODO
 * @Create by: jacob
 * @Date: 2025/7/20
 * 遇见未来的自己
 */
public interface SkmWxPayService {
    /**
     * 获取基础access_token
     * 注意：与用户授权acess_token不同
     * @return
     */
    String getBaseAccessToken();
    /**
     * 获取ticket
     * @return
     */
    String getJsapiTicket();

    /**
     * JSAPI支付下单，并返回JSAPI调起支付数据
     * @return
     */
    public PrepayWithRequestPaymentResponse prepayWithRequestPayment(BigDecimal amount);


    /**®®
     * 微信支付-支付成功统一回调接口
     * @param request
     */
    ResponseEntity.BodyBuilder wxPayCallback(HttpServletRequest request) throws IOException;

}
